package com.techstar.ats.dxp.live.rep;

import java.time.LocalDateTime;

import com.techstar.ats.dxp.AtsMessage;
import com.techstar.ats.dxp.AtsResponse;
import com.techstar.ats.type.DirectionType;
import com.techstar.ats.type.RecordType;
import com.techstar.ats.type.TrainType;

public class F08TrainRecord extends AtsMessage implements AtsResponse {
	private static final long serialVersionUID = 1L;
	public String train;
	public String global;
	public Integer localSub;
	public String group;
	public String dest;
	public TrainType trainType;
	public DirectionType dir;
	public Integer station;
	public Integer side;
	public String trackName;
	public RecordType recordType;
	public LocalDateTime recordTime;

	public boolean toCsvString(StringBuffer sb) {
		sb.append(this.line)
			.append(',')
			.append(this.train)
			.append(',')
			.append(this.global)
			.append(',')
			.append(this.localSub)
			.append(',')
			.append(this.group)
			.append(',')
			.append(this.dest)
			.append(',')
			.append(this.trainType)
			.append(',')
			.append(this.dir)
			.append(',')
			.append(this.station)
			.append(',')
			.append(this.side)
			.append(',')
			.append(this.trackName)
			.append(',')
			.append(this.recordType)
			.append(',')
			.append(this.recordTime.format(DATE_TIME_FORMATTER));
		return true;
	}
}
